#pragma once

class CRenderer;
class CScene;
class CMenuDialog;

class CMainFrame
{
public:
	CMainFrame();
	virtual ~CMainFrame();

	void Init();
	void MainLoop();

	CRenderer* GetRenderer() { return m_pRenderer; }

	void ReloadScene(const string& strFileName);

protected:
	SDL_Surface& InitSDL();
	CEGUI::WindowManager& InitCEGUI(SDL_Surface& surface);
	void SetCEGUIPaths();

	void CreateGUI(CEGUI::WindowManager& winManager);

	void Render();
	void RenderGUI();

	void HandleInput(bool &bQuit);
	void HandleMouseDown(Uint8 uiButton);
	void HandleMouseUp(Uint8 uiButton);

	void InjectTimePulse(double& dLastTimePulse);

	CRenderer* m_pRenderer;
	CScene* m_pScene;

	CMenuDialog* m_pMenuDialog;

	bool m_bRenderGUI;
};